package com.tvunetworks.center.user.model.vo;

import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.commons.lang.StringUtils;

import java.util.Objects;

/**
 * @program: tvucc-aggregator
 * @description: Setting页面分配设备时返回结果
 * @author lebronchen
 * @create: 2019-06-13 14:35
 **/
@Data
@Accessors(chain = true)
public class SearchUserDeviceVo {
    private String id;
    private String peerId;
    private String name;
    private String type;
    private String platform;
    private int relation;
    private int enableRelation;


    /**
     *
     * @param o o
     * @return boolean
     */
    @Override
    public boolean equals(Object o){
        if (! (o instanceof SearchUserDeviceVo)) {
            return false;
        }
        SearchUserDeviceVo o2 = (SearchUserDeviceVo)o;
        return StringUtils.equals(this.peerId, o2.getPeerId());
    }

    @Override
    public int hashCode() {
        return Objects.hash(peerId, name, type, platform, relation, enableRelation);
    }
}
